package com.lh.runmanage.model;

import com.lh.runmanage.myenum.ChartEnum;

import java.util.List;

public class SeriesDataModel {
    /**
     * 曲线类型：line、bar
     */
    private String type;
    /**
     * 各曲线标题
     */
    private String series;
    /**
     * 数据集合，数据不能断，要与横坐标数据数量一致，不够补0
     */
    private List<DataModel> data;

    public String getType() {
        return type;
    }

    public SeriesDataModel(ChartEnum chartEnum) {
        this.type = chartEnum.getType();
    }

    public String getSeries() {
        return series;
    }

    public void setSeries(String series) {
        this.series = series;
    }

    public List<DataModel> getData() {
        return data;
    }

    public void setData(List<DataModel> data) {
        this.data = data;
    }

    @Override
    protected void finalize() throws Throwable {
        super.finalize();
        if (data != null) {
            data.clear();
        }
    }
}
